<?php
/**
 * Created by PhpStorm.
 * User: 周超
 * Date: 2016/11/17
 * Time: 17:50
 */

namespace App\Http\Routes;

use Illuminate\Contracts\Routing\Registrar;
class RolesBackRoute
{
    public function map(Registrar $router)
    {
        $router->group(['middleware' =>  ['web','auth','permissions.check'],
            'prefix' => 'backstage/roles',], function ($router) {
            $router->get('list',['uses' =>'Backstage\RolesController@getList'])->name('get.roles.list');
            $router->get('update/{id}',['uses' =>'Backstage\RolesController@getUpdate'])->name('get.roles.list.update');
            $router->get('add',['uses' =>'Backstage\RolesController@getAdd'])->name('get.roles.list.add');
            $router->post('add',['uses' =>'Backstage\RolesController@postAdd'])->name('post.roles.list.add');
            $router->post('update',['uses' =>'Backstage\RolesController@postUpdate'])->name('post.roles.list.update');
            $router->get('delete/{id}',['uses' =>'Backstage\RolesController@getDelete'])->name('get.roles.list.delete');
            $router->get('add-permission/{id}',['uses' =>'Backstage\RolesController@getAddPermission'])->name('get.roles.list.add-permission');
            $router->post('add-permission',['uses' =>'Backstage\RolesController@postAddPermission'])->name('post.roles.list.add-permission');
        });
    }
}